<?php

if (isset($_GET["class"]) && isset($_GET["placenr"]))
{
	$class = $_GET["class"];
	$placenr = $_GET["placenr"];
	
	$QUERY = "
		DELETE FROM leerlingtoegang 
		WHERE plaatsnr = '$placenr'
		AND klas = '$class'
	";
	$RESULT = mysql_query($QUERY) or die('<b style="color: red; font-size: 25px;">Error!</b><br />QUERY:<br />' . $QUERY . '<br /><br />' . mysql_error());
	//echo "$QUERY<br />";
	
}

if (isset($_GET["hourid"]) && isset($_GET["placenr"]))
{
	$hourid = $_GET["hourid"];
	$placenr = $_GET["placenr"];
	
	$QUERY = "
		DELETE FROM studieuurplaats
		WHERE plaatsnr = '$placenr'
		AND	studieuur = '$hourid'
	";
	$RESULT = mysql_query($QUERY) or die('<b style="color: red; font-size: 25px;">Error!</b><br />QUERY:<br />' . $QUERY . '<br /><br />' . mysql_error());
	//echo "$QUERY<br />";
	
}

?>